﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Temp.Database;
using Temp.Model;

namespace Temp.Controller
{
    class DialogueController
    {
        private SQLiteFactory sqlf;
        private List<Dialogue> dialogueList;
        private SQLite.SQLiteConnection conn;
        public DialogueController() {
            sqlf = new SQLiteFactory();
        }

        public List<Dialogue> getDialogue(int dialogueId)
        {
            conn = sqlf.getConnection();
            dialogueList = (conn.Table<Dialogue>().Where(d => d.id == dialogueId)).ToList();
            conn.Close();
            return dialogueList;
        }

    }
}
